package com.lightsh.tuple;

/**
 * 该类用来生成各种元组
 * @author lightsh
 */
public class TupleHelper {
	public static <A, B> TwoTuple<A, B> twoTuple(A first, B second){
		return new TwoTuple<A, B>(first, second);
	}
	public static <A, B, C> ThreeTuple<A, B, C> threeTuple(A first, B second, C third){
		return new ThreeTuple<A, B, C>(first, second, third);
	}
	public static <A, B, C, D> FourTuple<A, B, C, D> fourTuple(A first, B second, C third, D fourth){
		return new FourTuple<A, B, C, D>(first, second, third, fourth);
	}
	public static <A, B, C, D, E> FiveTuple<A, B, C, D, E> fiveTuple(A first, B second, C third, D fourth, E fifth){
		return new FiveTuple<A, B, C, D, E>(first, second, third, fourth, fifth);
	}
	
	/**
	 * example as follow
	 * 生成一个3个数据的元组
	 */
	private ThreeTuple<String, Integer, String> gerenateThreeTuple(){
		return threeTuple("", 1, "");
	}
}
